package cafe.ejb;

import java.sql.SQLException;

import javax.ejb.Local;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;

import cafe.ejb.serviceinterfaces.WaitersOrdersServiceInterface;
import cafe.ejb.serviceinterfacesimpls.WaiterServiceInterfaceImpl;
import cafe.ejb.serviceinterfacesimpls.WaitersOrdersServiceInterfaceImpl;

/**
 * Session Bean implementation class WaitersOrdersBean
 */
@Stateless
@Local(WaitersOrdersService.class)
public class WaitersOrdersServiceBean implements WaitersOrdersService {
	
	private WaitersOrdersServiceInterface waitersOrdersSI;

    /**
     * Default constructor. 
     */
    public WaitersOrdersServiceBean() {
        waitersOrdersSI = new WaitersOrdersServiceInterfaceImpl();
    }

	@Override
	public void addLink(long waiterId, long orderId) throws SQLException {
		waitersOrdersSI.addLink(waiterId, orderId);		
	}

	@Override
	public void removeLink(long waiterId, long orderId) throws SQLException {
		waitersOrdersSI.removeLink(waiterId, orderId);		
	}
}
